import * as $Cesium from '@cesium/Source/Cesium.js';
import Wind3D from './Wind3D';
import {Panel} from './gui';

let Cesium = $Cesium;

const mode = {
    debug: false
};
var panel = new Panel();

function create(id, opts){
  if(mode.debug){
    opts.useDefaultRenderLoop = false;
  }
  
  // var viewer = new Cesium.Viewer(id, opts);
  var wind3D = new Wind3D(id, panel, mode, opts);
  
  var viewer = wind3D.viewer
  
  if(mode.debug){
    viewer.extend(Cesium.viewerCesiumInspectorMixin);
  }
  
  return viewer
}

export {create, Wind3D};